<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path=request.getContextPath();
	request.setAttribute("path", path);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="css/style.css" />
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
        <script type="text/javascript">
           EvPNG.fix('div, ul, img, li, input, a'); 
        </script>
    <![endif]-->    
    <script type="text/javascript" src="js/jquery-1.11.1.min_044d0927.js"></script>
	<script type="text/javascript" src="js/jquery.bxslider_e88acd1b.js"></script>
    
    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>    
        
	<script type="text/javascript" src="js/select.js"></script>
    
	<script type="text/javascript" src="js/lrscroll.js"></script>
    
    <script type="text/javascript" src="js/iban.js"></script>
    <script type="text/javascript" src="js/fban.js"></script>
    <script type="text/javascript" src="js/f_ban.js"></script>
    <script type="text/javascript" src="js/mban.js"></script>
    <script type="text/javascript" src="js/bban.js"></script>
    <script type="text/javascript" src="js/hban.js"></script>
    <script type="text/javascript" src="js/tban.js"></script>
    
	<script type="text/javascript" src="js/lrscroll_1.js"></script>
    
    <script type="text/javascript" src="js/regist.js"></script>
    
<title>注册</title>
</head>
<body>  
<%@ include file="/user_head.jsp" %>
<!--Begin Login Begin-->
<div class="log_bg">	
    <div class="top">
        <div class="logo"><a href="Index.html"><img src="images/logo.png" /></a></div>
    </div>
	<div class="regist">
    	<div class="log_img"><img src="images/l_img.png" width="611" height="425" /></div>
		<div class="reg_c">
        	<form action="loginServlet?opr=regist" method="post" id="frm">
            <table border="0" style="width:420px; font-size:14px; margin-top:20px;" cellspacing="0" cellpadding="0">
              <tr height="50" valign="top">
              	<td width="95">&nbsp;</td>
                <td>
                	<span class="fl" style="font-size:24px;">注册</span>
                    <span class="fr">已有商城账号，<a href="Login.jsp" style="color:#ff4e00;">我要登录</a></span>
                </td>
              </tr>
                <tr><td></td><td><span id="sp" style="color: red"></span></td></tr>   <%--内容显示区域--%>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;用户名 &nbsp;</td>
                <td><input type="text" value="" class="l_user" name="name" id="name"/></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;密码 &nbsp;</td>
                <td><input type="password" value="" class="l_pwd" name="pwd" /></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;确认密码 &nbsp;</td>
                <td><input type="password" value="" class="l_rpwd" name="rpwd" /></td>
              </tr>
              
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;真实姓名&nbsp;</td>
                <td><input type="password" value="" class="l_ruser" name="realname"/></td>
              </tr>
              
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;性别&nbsp;</td>
                <td><input type="radio" name="sex" value="1"/>男<input type="radio" name="sex" value="0"/>女</td>
              </tr>
              
              <tr height="50">
                <td align="right"><font color="#ff4e00"></font>&nbsp;身份证号 &nbsp;</td>
                <td><input type="text" value="" class="l_user" name="userid" id="userid"/></td>
              </tr>
              
              <tr height="50">
                <td align="right"><font color="#ff4e00"></font>&nbsp;邮箱 &nbsp;</td>
                <td><input type="text" value="" class="l_email" name="email"/></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00"></font>&nbsp;手机 &nbsp;</td>
                <td><input type="text" value="" class="l_tel" name="tel"/></td>
              </tr>
              <tr>
              	<td>&nbsp;</td>
                <td style="font-size:12px; padding-top:20px;">
                	<span style="font-family:'宋体';" class="fl">
                    	<label class="r_rad"><input type="checkbox" checked="checked"/></label><label class="r_txt">我已阅读并接受《用户协议》</label>
                    </span>
                </td>
              </tr>
              <tr height="60">
              	<td>&nbsp;</td>
                <td><input type="submit" value="立即注册" class="log_btn" /></td>
              </tr>
            </table>
            </form>
        </div>
    </div>
</div>
<!--End Login End--> 
<%@ include file="/user_foot.jsp"%>

</body>


<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
<%--
<script type="text/javascript" src="${pageContext.request.contextPath}/js/regist.js"></script>
--%>


<script type="text/javascript">
    $(function () {
        $("#frm").submit(function () {
            var name=$("name").val();
            var pwd=$("pwd").val();
            var rpwd=$("rpwd").val();
            var realname=$("realname").val();
            var sex=$("sex").val();
            var userid=$("#userid").val();
            var email=$("email").val();
            var tel=$("tel").val();
            if(name==''&&name.length==0){
                $("#sp").html("用户名不能为空哦!").fadeIn(1000).fadeOut(5000);
                return false;
            }
            if(pwd==''&&pwd.length==0){
                $("#sp").html("密码不能为空哦!").fadeIn(1000).fadeOut(5000);
                return false;
            }
            if(rpwd==''&&rpwd.length==0){
                $("#sp").html("确认密码不能为空哦!").fadeIn(1000).fadeOut(5000);
                return false;
            }
            if(rpwd!=pwd){
                $("#sp").html("两次密码不一致哦!").fadeIn(1000).fadeOut(5000);
                return false;
            }
            if(realname=='' && realname.length==0){
                $("#sp").html("真实姓名不能为空哦!").fadeIn(1000).fadeOut(5000);
                return false;
            }
            if(sex==''||sex==null){
                $("#sp").html("请选择性别哦!").fadeIn(1000).fadeOut(5000);
                return false;
            }
            if(userid==''&&userid.length==0){
                $("#sp").html("身份证号不能为空哦!").fadeIn(1000).fadeOut(5000);
                return false;
            }
            if(email==''&&email.length==0){
                $("#sp").html("邮箱不能为空哦!").fadeIn(1000).fadeOut(5000);
                return false;
            }
            if(tel==''&&tel.length==0){
                $("#sp").html("手机号不能为空哦!").fadeIn(1000).fadeOut(5000);
                return false;
            }
        })




    });
</script>
